﻿using System;
using System.Globalization;
using System.Windows.Data;
using Appology.SugarSync.IO;

namespace Appology.SugarSync.Explorer.Phone.Converters
{
    public class PathInfoImageConverter : IValueConverter
    {
        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if(value is SugarSyncDirectoryInfo)
            {
                return new Uri("icons/Folder.png", UriKind.Relative);
            }

            if(value is SugarSyncFileInfo)
            {
                return new Uri("icons/Document.png", UriKind.Relative);
            }

            return null;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}